import request from '@/utils/request'

const baseURL = 'http://localhost:39203/carbon/file'
// const baseURL = 'http://116.204.103.224:39203/file'

//导出燃料燃烧
export function exportExcel(fileName) {
  return request({
    url: '/exportExcel',
    method: 'get',
    params: { fileName: fileName },
    responseType: 'blob',
    baseURL: baseURL
  })
}

//导入燃料燃烧
export function importExcel() {
  return request({
    url: '/importExcel',
    method: 'post',
    baseURL: baseURL
  })
}

//导出电力热力
export function exportElectricHeatExcel(fileName) {
  return request({
    url: '/exportElectricHeatExcel',
    method: 'get',
    params: { fileName: fileName },
    responseType: 'blob',
    baseURL: baseURL
  })
}

//导入电力热力
export function importElectricHeatExcel() {
  return request({
    url: '/importElectricHeatExcel',
    method: 'post',
    baseURL: baseURL
  })
}

//导出工业生产
export function exportIndustoryProduceExcel(fileName) {
  return request({
    url: '/exportIndustoryProduceExcel',
    method: 'get',
    params: { fileName: fileName },
    responseType: 'blob',
    baseURL: baseURL
  })
}

//导入工业生产
export function importIndustoryProduceExcel() {
  return request({
    url: '/importIndustoryProduceExcel',
    method: 'post',
    baseURL: baseURL
  })
}


//导出固碳产品
export function exportFixCarbonExcel(fileName) {
  return request({
    url: '/exportFixCarbonExcel',
    method: 'get',
    params: { fileName: fileName },
    responseType: 'blob',
    baseURL: baseURL
  })
}

//导入固碳产品
export function importFixCarbonExcel() {
  return request({
    url: '/importFixCarbonExcel',
    method: 'post',
    baseURL: baseURL
  })
}
